import Vue from 'vue'
import Vuex from 'vuex'
import client from './client'
import menu from './menu'
import organization from './organization'
import premission from './premission'
import resource from './resource'
import role from './role'
import user from './user'
import createLogger from '../plugins/logger'

Vue.use(Vuex)

const debug = process.env.NODE_ENV !== 'production'

export default new Vuex.Store({
  modules: {
    client,
    menu,
    organization,
    premission,
    resource,
    role,
    user
  },
  strict: debug,
  plugins: debug ? [createLogger()] : []
})
